//============================================================================
// Name        : util.h
// Author      : bycy
// Version     : 1.0
// Description : 
//============================================================================

/*
* if_define
*
* test if from defines relevant variable of value
*
* REQUIRE:	value NOT NULL
*
* RETURN:	ture if from does define relevant variable of value
*		false if from does not define relevant variable of value
*
* MODIFY:	
*/

bool if_define(vector<opnd_t> from, opnd_t value);

/*
* if_define
*
* test if temp_from define relevant variable of temp_to
*
* REQUIRE:	temp_from NOT NULL
*		temp_to NOT NULL
*
* RETURN:	ture if temp_from does define relevant variable of temp_to
*		false if temp_from does not define relevant variable of temp_to
*
* MODIFY:	
*/

bool if_define(instruction_t *temp_from, instruction_t *temp_to);

/*
* if_contain
*
* test if vector from contains opnd_t value
*
* REQUIRE:	value NOT NULL
*
* RETURN:	ture if vector from does not contain opnd_t value
*		false if vector from does not contain opnd_t value
*
* MODIFY:	from
*/

bool if_contain(vector<opnd_t> from, opnd_t value);


/*
* if_contain
*
* test if vector from contains instr_t * value
*
* REQUIRE:	value NOT NULL
*
* RETURN:	ture if vector from does not contain instr_t * value
*		false if vector from does not contain instr_t * value
*
* MODIFY:	from
*

bool if_contain(vector<instr_t *> from, instr_t * value);